function setDefaultMemberDialog(
    {
        memberId,
        memberName = "",
        callback = Function()
    }
) {
    if (!memberId) {
        return $.toast("成员ID不能为空");
    }

    const $dialogWidget = $.dialog(
        memberName ? "是否确定设置成员(" + memberName + ")为默认成员" : "是否确定设置该成员为默认成员",
        {
            title: "设置默认成员",
            width: "300px",
            ok() {
                setDefaultMember({
                    memberId
                }, res => {
                    if (res.Code !== 10000) {
                        return $.toast(res.Message);
                    }

                    $dialogWidget.remove();
                    $.toast("设置成功");
                    callback();
                })
            }
        }
    )

    function setDefaultMember(param, callback = Function()) {
        return $.sApi({
            data: param,
            url: "/api/Member/setDefaultMember",
        }, callback)
    }
}